-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Udl #13
base: 7.10
Are you sure you want to change the base?
Udl #13
Conversation
|
From the blame information on this pull request, potential reviewers: @vpasquier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Commits should be squashed
-
As a thought, the goal here is to go through this mapper only in the case of an invitation. Instead of moving the code and deprecate the mapper, we can check if this can be done in the
ShibbolethAuthenticationPlugin
(where we always go through the mapper if defined). Otherwise change to what was done in the PR.
.gitignore
Outdated
@@ -12,6 +12,8 @@ pojo-bin | |||
seam-bin | |||
deploy.sh | |||
log/ | |||
.idea | |||
nuxeo-shibboleth-invitation.iml | |||
|
|||
*.pyc | |||
*~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be removed from the commit.
pom.xml
Outdated
<groupId>org.nuxeo.shibboleth.invitation</groupId> | ||
<artifactId>nuxeo-shibboleth-invitation</artifactId> | ||
<groupId>${marketplace.bundle.groupId}</groupId> | ||
<artifactId>nuxeo-shibboleth-invitation-udl</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original groupId/artifactId should be set back.
import javax.ws.rs.PathParam; | ||
import javax.ws.rs.Produces; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.ws.rs.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wildcard imports shouldn't be used.
ShibbolethAuthenticationService shiboService = Framework.getService(ShibbolethAuthenticationService.class); | ||
final String userID = shiboService.getUserID(httpServletRequest); | ||
log.trace("userID:" + userID); | ||
log.trace("getUserInfoUsernameField:" +Framework.getLocalService(UserRegistrationService.class).getConfiguration(DEFAULT_REGISTRATION).getUserInfoUsernameField()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Framework.getService
can in fact directly be used.
return getView("UserCreated").arg("data", registrationData) | ||
.arg("redirectUrl", "/nuxeo/site/shibboleth?requestedUrl=") | ||
.arg("isShibbo", isShibbo); | ||
String validationRelUrl = "https://nuxeo.universite-lyon.fr/" + usr.getConfiguration(configurationName).getValidationRelUrl()+ "?isShibbo=true&RequestId="+requestId+"&ConfigurationName="+configurationName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This url should be refactored as it is specific to a use case.
this.roles = roles; | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Classes should be deprecated and not removed.
public String getTargetRepositoryName() { | ||
return Framework.getService(RepositoryManager.class).getDefaultRepositoryName(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for deprecation instead of removal.
Let's wait for https://jira.nuxeo.com/browse/NXP-24076 to see if it fixes the issue |
J'ai supprimé la partie ShibbolethUserMapping et déplacé la mise en place des droits utilisateurs
dans ShibboInviteObject.java en ajoutant l'url
shibboInvite/shibboleth?RequestId=xxxxxx
de cette façon même si l'email ou l'identifiant shibboleth de l'utilisateur sont différents de celui de l'invitation les droits correctes seront affectés.